public abstract with sharing class AbstractBean 
{
	public Set<String>errors;
	
	public AbstractBean()
	{
		this.errors = new Set<String>();
	}
	
	public String[] getErrors()
    {
    	String[] errors = new String[this.errors.size()];
    	Integer i = 0;
    	for(String error : this.errors) 
    	{       
    		errors[i] = error;
    		i++;
    	}
    	return errors;
    }
    
    public boolean getHasValidationErrors()
    {
    	return !this.errors.isEmpty();
    }
}